﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cms.Tests.Unit.TestUtils
{

    public class DateTimeValidation
    {

        public static bool IsNow(DateTime value)
        {
            DateTime now = DateTime.Now;
            return now.Ticks >= value.Ticks && now.Ticks < value.Ticks + 1000000; // 100 ms
        }


        public static bool IsNow(long ticks)
        {
            DateTime now = DateTime.Now;
            return now.Ticks >= ticks && now.Ticks < ticks + 1000000; // 100 ms
        }

    }

}
